package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.AppType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("apps")
@ApiModel(value="AppsEntity对象", description="")
public class AppEntity implements Serializable {
    @ApiModelProperty(value = "应用ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "名称，最多15个中文字")
    private String name;

    @ApiModelProperty(value = "应用类型：1优惠券，2会员，3卖品配送，4电子检票，5先看后付，6售后服务，7在线取票")
    private AppType type;

    @ApiModelProperty(value = "描述")
    @TableField("\"desc\"")
    private String desc;
    
    @ApiModelProperty(value = "封面")
    private String cover;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    @TableLogic(value = "null", delval = "now()")
    @TableField(select = false)
    private LocalDateTime deletedAt;
}
